package com.zhangrui.text;

import com.zhangrui.dao.StudentMapper;
import com.zhangrui.dao.TeacherMapper;
import com.zhangrui.pojo.Student;
import com.zhangrui.pojo.Teacher;
import com.zhangrui.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.apache.log4j.Logger;
import org.junit.Test;

import java.util.List;

/**
 * ClassName:TextSql
 * Package:com.zhangrui.text
 * Description:
 *
 * @Date:2021/8/200:11
 * @Author:zhangrui@qq.com
 */
public class TextSql {
    static Logger logger = Logger.getLogger(TextSql.class);

    @Test
    public void test1() {
        SqlSession sqlSession = MybatisUtils.getSqlSession();
        TeacherMapper teacherMapper = sqlSession.getMapper(TeacherMapper.class);
        Teacher teacher = teacherMapper.getTeacher(1);
        logger.info("我就是一个日志啊兄弟！！！" + teacher);
        sqlSession.close();

    }


}
